<template>
  <div id="app">
    <keep-alive>
      <router-view v-if="$route.meta.keepAlive" :key="key" />
    </keep-alive>
    <router-view v-if="!$route.meta.keepAlive" :key="key" />
  </div>
</template>

<script>

export default {
  components: {

  },
  computed: {
    key() {
        if (this.$route.meta.selfPath){
            return this.$route.fullPath
        }else {
            return this.$route.path
        }

    }
  },
}
</script>

<style scoped>
  #app{
    height: 100%;
  }
</style>

